﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using Demo.Services.View.Controllers;
using Demo.Services.Contracts.DTO.Infos;
using Demo.CommonBase.View.Forms;
using Ext.Net;

namespace Demo.Web.Reports
{
    public partial class Project : PageBase
    {
        protected void Page_Load(object sender, EventArgs e)
        {
           if (!IsPostBack)
            {

                ReportController cont = new ReportController();
                IList<ProjectReportInfo> projectList;               
                cont.ExecuteService(this, "Services.GetProject");
                projectList = (IList<ProjectReportInfo>)GetValue("Projects");
                var store =  Chart1.GetStore();
                store.DataSource = projectList;
                store.DataBind();
                Chart1.DataBind();
                var store2 = GridPanel1.GetStore();
                store2.DataSource = projectList;
                store2.DataBind();
                GridPanel1.DataBind();
                
            }	
        }
    }
}